﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectManager.aspx.cs" Inherits="AirCondition.HR.ProjectManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <style type="text/css">
body { font-family: Verdana; font-size: 12px; line-height: 1.5; }
a { color: #000; text-decoration: none; }
a:hover { color: #F00; }
#menu { width:500px; height:28px; margin:0 auto; border-bottom:3px solid #E10001;}
#menu ul { list-style: none; margin: 0px; padding: 0px; }
#menu ul li { float:left; margin-left:2px;}
#menu ul li a { display:block; width:87px; height:28px; line-height:28px; text-align:center; background:url(images/2010-08/17/091033_nav_bg2.gif) 0 0 no-repeat; font-size:14px;}
#menu ul li a:hover { background:url(images/2010-08/17/091033_nav_bg3.gif) 0 0 no-repeat;}
#menu ul li a#current { background:url(images/2010-08/17/091033_nav_bg1.gif) 0 0 no-repeat; font-weight:bold; color:#fff;}
</style>

</head>
<body>
   
    <form id="form1" runat="server">
    <div id="menu">
<ul>
<li><a href="#">首页</a></li>
<li><a href="ProjectManager.aspx">工程项目管理</a></li>
<li><a href="EmployeeManager.aspx">薪酬体系管理</a></li>
<li><a href="#">查询统计报表</a></li>
<li><a href="#">系统管理</a></li>
</ul>
</div>    
    <div>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" CellPadding="4" DataKeyNames="pid" 
            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
        <RowStyle BackColor="#EFF3FB" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="pid" HeaderText="pid" InsertVisible="False" 
                ReadOnly="True" SortExpression="pid" />
            <asp:BoundField DataField="pname" HeaderText="名称" SortExpression="pname" />
            <asp:BoundField DataField="pplace" HeaderText="所在地" SortExpression="pplace" />
            <asp:BoundField DataField="pmanager" HeaderText="负责人" 
                SortExpression="pmanager" />
            <asp:BoundField DataField="pstarttime" HeaderText="开始时间" 
                SortExpression="pstarttime" />
            <asp:BoundField DataField="pstatus" HeaderText="状态" SortExpression="pstatus" />
            <asp:BoundField DataField="pendtime" HeaderText="结束时间" 
                SortExpression="pendtime" />
            <asp:BoundField DataField="pfunds" HeaderText="项目额度" SortExpression="pfunds" />
            <asp:BoundField DataField="paddmoney1" HeaderText="追加额度1" 
                SortExpression="paddmoney1" />
            <asp:BoundField DataField="paddmoney2" HeaderText="追加额度2" 
                SortExpression="paddmoney2" />
            <asp:BoundField DataField="paddmoney3" HeaderText="追加额度3" 
                SortExpression="paddmoney3" />
            <asp:BoundField DataField="paddmoney4" HeaderText="追加额度4" 
                SortExpression="paddmoney4" />
            <asp:BoundField DataField="paddmoney5" HeaderText="追加额度5" 
                SortExpression="paddmoney5" />
        </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="Data Source=FANTASY\FANTASY;Initial Catalog=sc_hr;Persist Security Info=True;User ID=sa;Password=sa123" 
            DeleteCommand="DELETE FROM [tb_PprojectInfo] WHERE [pid] = @pid" 
            InsertCommand="INSERT INTO [tb_PprojectInfo] ([pname], [pplace], [pmanager], [pstarttime], [pstatus], [pendtime], [pfunds], [paddmoney1], [paddmoney2], [paddmoney3], [paddmoney4], [paddmoney5]) VALUES (@pname, @pplace, @pmanager, @pstarttime, @pstatus, @pendtime, @pfunds, @paddmoney1, @paddmoney2, @paddmoney3, @paddmoney4, @paddmoney5)" 
            ProviderName="System.Data.SqlClient" 
            SelectCommand="SELECT * FROM [tb_PprojectInfo]" 
            UpdateCommand="UPDATE [tb_PprojectInfo] SET [pname] = @pname, [pplace] = @pplace, [pmanager] = @pmanager, [pstarttime] = @pstarttime, [pstatus] = @pstatus, [pendtime] = @pendtime, [pfunds] = @pfunds, [paddmoney1] = @paddmoney1, [paddmoney2] = @paddmoney2, [paddmoney3] = @paddmoney3, [paddmoney4] = @paddmoney4, [paddmoney5] = @paddmoney5 WHERE [pid] = @pid">
            <DeleteParameters>
                <asp:Parameter Name="pid" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="pname" Type="String" />
                <asp:Parameter Name="pplace" Type="String" />
                <asp:Parameter Name="pmanager" Type="String" />
                <asp:Parameter Name="pstarttime" Type="DateTime" />
                <asp:Parameter Name="pstatus" Type="String" />
                <asp:Parameter Name="pendtime" Type="DateTime" />
                <asp:Parameter Name="pfunds" Type="String" />
                <asp:Parameter Name="paddmoney1" Type="String" />
                <asp:Parameter Name="paddmoney2" Type="String" />
                <asp:Parameter Name="paddmoney3" Type="String" />
                <asp:Parameter Name="paddmoney4" Type="String" />
                <asp:Parameter Name="paddmoney5" Type="String" />
                <asp:Parameter Name="pid" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="pname" Type="String" />
                <asp:Parameter Name="pplace" Type="String" />
                <asp:Parameter Name="pmanager" Type="String" />
                <asp:Parameter Name="pstarttime" Type="DateTime" />
                <asp:Parameter Name="pstatus" Type="String" />
                <asp:Parameter Name="pendtime" Type="DateTime" />
                <asp:Parameter Name="pfunds" Type="String" />
                <asp:Parameter Name="paddmoney1" Type="String" />
                <asp:Parameter Name="paddmoney2" Type="String" />
                <asp:Parameter Name="paddmoney3" Type="String" />
                <asp:Parameter Name="paddmoney4" Type="String" />
                <asp:Parameter Name="paddmoney5" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    </div>
    
    <div> 
    <asp:Button ID="Button1" runat="server" Text="增加" onclick="Button1_Click" />
    </div>
    
    </form>
</body>
</html>
